const router = require('koa-router')()

const { str2uri,uri2str } = require("../utils/string-util")

router.prefix('/str')

router.get('/encode', function (ctx, next) {
  ctx.body = str2uri(ctx.request.query["wd"])
})

router.get('/decode', function (ctx, next) {
  ctx.body = uri2str(ctx.request.query["wd"])
})

module.exports = router
